<template>
  <el-card>
    <el-row>
      <!-- 左侧菜单栏 -->
      <el-col :span="3">
        <el-menu
          class="el-menu-vertical-demo"
          default-active="2"
          @close="handleClose"
          @open="handleOpen"
        >
          <!-- 菜单项代码省略，保持不变 -->
          <el-menu-item index="1">
            <i class="el-icon-location" />
            <span slot="title">
              <router-link to="/mall/user/userCenter">
                账户资料
              </router-link>
            </span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-menu" />
            <span slot="title">
              <router-link to="/mall/user/order">
                我的订单
              </router-link>
            </span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-document" />
            <span slot="title">收货地址</span>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-phone" />
            <span slot="title">售后服务</span>
          </el-menu-item>
          <el-menu-item index="5">
            <i class="el-icon-service" />
            <span slot="title">客服中心</span>
          </el-menu-item>
          <el-menu-item index="6">
            <i class="el-icon-setting" />
            <span slot="title">联系我们</span>
          </el-menu-item>
        </el-menu>
      </el-col>
      <!-- 右侧内容区域 -->
      <el-col :span="21">
        <!--      <内容-->
        <router-view />
      </el-col>
    </el-row>
  </el-card>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
